/*
 * @Author: 刘经标 2604132672@qq.com
 * @Date: 2025-04-14 11:44:49
 * @LastEditors: 刘经标 2604132672@qq.com
 * @LastEditTime: 2025-04-14 11:44:59
 * @FilePath: /ai-backend/src/utils/logger.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import winston from 'winston';

const logger = winston.createLogger({
  level: 'info',
  format: winston.format.combine(
    winston.format.timestamp(),
    winston.format.json()
  ),
  transports: [
    new winston.transports.Console(),
    new winston.transports.File({ filename: 'logs/error.log', level: 'error' }),
    new winston.transports.File({ filename: 'logs/combined.log' })
  ]
});

export { logger };